<template>
  <div class="app-container">
    <Ht-search-form
      v-show="showSearch"
      :advOptions="[]"
      :dictMap="dictMap"
      :formOptions="formOptions"
      :outputQueryParams="queryParams"
      :queryParams="queryParams"
      :defaultEventKey="defaultEventKey"
    ></Ht-search-form>

    <ht-table
      :defaultEventKey="defaultEventKey"
      ref="dataTable"
      :dictMap="dictMap"
      :multi-select="false"
      :opButtonList="opButtonList"
      :queryParams="queryParams"
      :reqConfig="regConfig"
      :showSerialNumber="false"
      :tableBindColumns="tableBindColumns"
    ></ht-table>
  </div>
</template>

<script>
import { listPageMixin } from "@/libs/listPageMixin";
import HtAmountInput from "@/views/components/HtAmountInput";
import { apiUrlConfigDetailQuery, apiUrlConfigQuery, apiUrlConfigRegQuery } from "@/api/cnaps/ccms/928";
export default {
  name: "authenticationRegBusinessQuery",
  mixins: [listPageMixin],
  components: { HtAmountInput },
  data() {
    return {
      defaultEventKey: "defaultEventKey",
      // 查询参数
      queryParams: {
        sysCode:"",
        directOrg:"",
        msgType:"",
      },

      // 搜索
      formOptions: [],
      //
      searchFormDictList: ["DRCTCODE", "ORGAN_SYSTYPE_310", "MNG_TYPE"],
      // 列信息
      regConfig: apiUrlConfigRegQuery,

      rules: {},

      tableBindColumns: [
        { prop: "id", label: "序号", width: 180 },
        { prop: "sysCode", label: "系统编号", dictCode: "ORGAN_SYSTYPE_310", width: 150 },
        { prop: "directOrg", label: "直接参与机构号", width: 150 },
        { prop: "msgType", label: "报文类型", dictCode: "MSG_TYPE148", width: 180 },
        { prop: "mngType", label: "管理类型", dictCode: "MNG_TYPE" },
        {
          prop: "bizTypeCode",
          label: "业务类型编码",
          formatter(row, text, index) {
            return (
              (row["bizTypeCode"] === null || row["bizTypeCode"] === undefined ? "" : row["bizTypeCode"]) +
              "-" +
              (row["bizTypeCodeDesc"] === null || row["bizTypeCodeDesc"] === undefined ? "" : row["bizTypeCodeDesc"])
            );
          },
          width: 240,
        },
        {
          prop: "bizCtgyCode",
          label: "业务种类编码",
          sortable: false,
          formatter(row, text, index) {
            return (
              (row["bizCtgyCode"] === null || row["bizCtgyCode"] === undefined ? "" : row["bizCtgyCode"]) +
              "-" +
              (row["bizCtgyCodeDesc"] === null || row["bizCtgyCodeDesc"] === undefined ? "" : row["bizCtgyCodeDesc"])
            );
          },
        },
        { prop: "crtDate", label: "记录生成日期", type: "date", width: 180 },
      ],

      dictMapAsync: {},
      // 弹出层标题
      title: "",
      totalRecord: 0,
      totalPage: 0,
      needCount: 0,
    };
  },
  mounted() {
    const formOptions = [
      // 普通搜索

      {
        type: "dict",
        dict: "ORGAN_SYSTYPE_310",
        prop: "sysCode",
        defaultAttr: {
          size: "small",
          label: "系统编号",
          placeholder: "请输入系统编号",
        },
      },

      {
        type: "input",
        prop: "directOrg",
        defaultAttr: {
          size: "small",
          label: "直接参与机构号",
          placeholder: "请输入直接参与机构号",
        },
      },

      {
        type: "dict",
        dict: "MSG_TYPE148",
        prop: "msgType",
        defaultAttr: {
          size: "small",
          label: "报文类型",
          placeholder: "请输入报文类型",
        },
      },
    ];
    this.formOptions = formOptions;
    this.dictMapAsync = this.getDictMap();
  },
  methods: {},
};
</script>
